package com.wmh.baseservice.admin.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wmh.baseservice.admin.entity.AdRoleRobotTask;
import com.wmh.baseservice.admin.mapper.AdRoleRobotTaskMapper;
import com.wmh.baseservice.admin.service.AdRoleRobotTaskService;
import com.wmh.baseservice.common.mybatisplus.structure.LambdaQueryWrapperX;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 谢骏
 * @description 针对表【ad_role_robot_task(用户角色与机器任务编号的映射)】的数据库操作Service实现
 * @createDate 2023-11-07 09:23:18
 */
@Service
public class AdRoleRobotTaskServiceImpl extends ServiceImpl<AdRoleRobotTaskMapper, AdRoleRobotTask>
        implements AdRoleRobotTaskService {

    @Override
    public void deleteByRoleId(Long roleId) {
        baseMapper.delete(new LambdaQueryWrapperX<AdRoleRobotTask>()
                .eq(AdRoleRobotTask::getRoleId, roleId));
    }

    @Override
    public List<AdRoleRobotTask> getByRoleId(Long roleId) {
        return baseMapper.get(roleId);
    }

    @Override
    public List<AdRoleRobotTask> getByRoleIds(List<Long> roleIds) {
        return baseMapper.get(roleIds);
    }
}




